Skip to content

SECVULN-29968: Harden STS endpoint parsing in AWS auth - #402

Merged
chrisarcand merged 1 commit into
masterfrom
secvuln-29968-sts-endpoint-parse
Mar 19, 2026
Merged

SECVULN-29968: Harden STS endpoint parsing in AWS auth#402
chrisarcand merged 1 commit into
masterfrom
secvuln-29968-sts-endpoint-parse

Conversation

@chrisarcand

Copy link
Copy Markdown
Member

Summary

  • replace permissive STS endpoint matching in AWS auth with strict HTTPS URI and host validation
  • preserve supported global, regional, GovCloud, and China STS endpoint handling while rejecting malformed and attacker-shaped inputs
  • add unit coverage for standard regional parsing and malformed endpoint cases

Validation

  • GOENV_VERSION=1.24.3 bundle exec rspec spec/unit/auth_spec.rb spec/integration/api/auth_spec.rb

@chrisarcand
chrisarcand requested a review from a team as a code owner March 19, 2026 19:14
@chrisarcand

chrisarcand commented Mar 19, 2026

Copy link
Copy Markdown
Member Author

There are many changes in the diff here that are nothing to do with the purpose of the PR. They are all stylistic and are hiding the change.

Note: I am having a 'conversation with myself' to test an agentic flow here, don't mind me :)

Replace permissive STS endpoint matching with strict HTTPS host validation so malformed inputs are rejected without regex backtracking risk.
@chrisarcand
chrisarcand force-pushed the secvuln-29968-sts-endpoint-parse branch from 49ff053 to 936d9f2 Compare March 19, 2026 19:32

@amy-hashi amy-hashi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't validating the URL is in the valid format, but it doesn't actually matter, because it'll fail anyway. 💃 LGTM

@chrisarcand
chrisarcand merged commit 5c1c804 into master Mar 19, 2026
27 checks passed
@chrisarcand
chrisarcand deleted the secvuln-29968-sts-endpoint-parse branch March 19, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants